<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<script>
		function changeColor(){
			var strCon = document.getElementById("con");
			var selColor = document.getElementById("selectColor").value;
			strCon.style.color = selColor;
		}
		</script>
	</head>
	<body>
		<div id="con">DOM树是有许多HTML标签元素构成的，这些标签元素是树上的节点</div>
		<select> onchange="changeColor()" id="selectColor">
			<option value="black">黑色</option>
			<option value="blue">蓝色</option>
			<option value="green">绿色</option>
			<option value="red">红色</option>
			<option value="orange">橙色</option>
		</select>
	</body>
</html>
